package bc

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type BcAgencyRouter struct {
}

// InitBcAgencyRouter 初始化 bcAgency表 路由信息
func (s *BcAgencyRouter) InitBcAgencyRouter(Router *gin.RouterGroup) {
	bcAgencyRouter := Router.Group("bcAgency").Use(middleware.OperationRecord())
	bcAgencyRouterWithoutRecord := Router.Group("bcAgency")
	var bcAgencyApi = v1.ApiGroupApp.BcApiGroup.BcAgencyApi
	{
		bcAgencyRouter.POST("createBcAgency", bcAgencyApi.CreateBcAgency)             // 新建bcAgency表
		bcAgencyRouter.DELETE("deleteBcAgency", bcAgencyApi.DeleteBcAgency)           // 删除bcAgency表
		bcAgencyRouter.DELETE("deleteBcAgencyByIds", bcAgencyApi.DeleteBcAgencyByIds) // 批量删除bcAgency表
		bcAgencyRouter.PUT("updateBcAgency", bcAgencyApi.UpdateBcAgency)              // 更新bcAgency表
	}
	{
		bcAgencyRouterWithoutRecord.GET("findBcAgency", bcAgencyApi.FindBcAgency)       // 根据ID获取bcAgency表
		bcAgencyRouterWithoutRecord.GET("getBcAgencyList", bcAgencyApi.GetBcAgencyList) // 获取bcAgency表列表
	}
	global.GVA_Timer.AddTaskByFunc("func", "@daily", bcAgencyApi.DeleteBcAgencyByTime)
}
